/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.wpi.first.wpilibj.sensor;

import edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj.DigitalOutput;
import edu.wpi.first.wpilibj.Ultrasonic;
import edu.wpi.first.wpilibj.positioning.Coordinates;
import edu.wpi.first.wpilibj.positioning.PositionHandler;

/**
 *
 * @author 8349
 */
public class Sonar extends Ultrasonic{
    
    private Coordinates location;

    public Sonar(Coordinates location, int pingSlot, int pingChannel, int echoSlot, int echoChannel) {
        super(pingSlot, pingChannel, echoSlot, echoChannel);
        this.location = location;
    }

    public Sonar(Coordinates location, int pingSlot, int pingChannel, int echoSlot, int echoChannel, Unit units) {
        super(pingSlot, pingChannel, echoSlot, echoChannel, units);
        this.location = location;
    }

    public Sonar(Coordinates location, DigitalOutput pingChannel, DigitalInput echoChannel) {
        super(pingChannel, echoChannel);
        this.location = location;
    }

    public Sonar(Coordinates location, DigitalOutput pingChannel, DigitalInput echoChannel, Unit units) {
        super(pingChannel, echoChannel, units);
        this.location = location;
    }

    public Sonar(Coordinates location, int pingChannel, int echoChannel) {
        super(pingChannel, echoChannel);
        this.location = location;
    }

    public Sonar(Coordinates location, int pingChannel, int echoChannel, Unit units) {
        super(pingChannel, echoChannel, units);
        this.location = location;
    }
    
    public boolean updatePosition (PositionHandler handler, Sonar other){
        boolean returnbool;
        double range1 = getRangeInches();
        double range2 = other.getRangeInches();
        Coordinates location2 = other.location;
        throw new UnsupportedOperationException("TODO!");
    }
    
}
